VBScript → Lua
To use any of these functions just follow these steps:
-
Copy the function code into the Windows clipboard (select the code and press Ctrl-C)
-
Open you GSE call routing rule.
-
Double click the Start block
-
Switch to the Parameters page
-
Click into the huge text field and paste the function code by pressing Ctrl-V.

- Click OK.
The function is now available within you call routing rule and can now be used directly within GSE blocks.
Handle boolean return values
The above example function IsUserFree returns a booelan value. It can most conveniently be called with the Evaluate block:
Handle numeric return values (up to 10 different ones)
If your function returns more than 2 different values you can use an Insert Script Code block to evaluate up to 10 different values graphically. This is an example of how to use the UserStatus function:
Handle any return values
You can call your own functions nearly everywhere within your GSE script. Where ever you find a
button behind a parameter text field, you can call your function if it returns a needed value. For example a function GetDestination returns the extension a call should be connected to with a Connect To block:
By Tom Wellige
